Summary

Trip data from July and November 2016 in Hamilton Ontario were compared in order to understand changes in ridership patterns. The following research takes into consideration the number of trips that looked like daily commutes vs. leisure, most active and frequently paired hubs, and compares details such as average distance, duration, and areas through which riders pass. A visualization of patterns between those two months was created in Mapbox. The following research demonstrated 1) a noticeable shift in ridership concentration from Hamilton center to McMaster University campus 2) that July experienced more than twice the amount of leisure trips than November whereas November experience a higher share of commutes 3) that there is an indirect relationship between hub activity and distance to Hamilton’s designated bikeways.

Distance, Duration & Time

On average, trips were about 4.3 minutes longer in July than they were in November and about .56 km longer. The plot below overlays hourly start counts and demonstrates that in November, significantly fewer riders started trips after 17:00 in November as comared to July. The only hour which experienced more total rides was 8:00. In July, rides peaked at 17:00 whereaas in November, rides peaked at 16:00.

  July November
distance (km) 2.34 1.78
duration (m) 18.3 14

Approximately 10% of start and end points fell outside of hub geofences and therefore were not assigned to a particular hub in the feed. In order for this valuable data not to be lost, a fishnet grid of uniform polygons was created to sample the study area. The difference between starts per location over the two months was analyzed. Below, we can see from the first row, which corresponds to trip starts not assigned a hub, that 10.83% of trips in July and 10.69% of trips in November began outside of hub geofences. This indicates that there was no significant difference between months in terms of riders starting outside of geofences.

Starting Points

hub freq_j %total_j freq_n %total_n diff
4013 10.83 3035 10.69 978
270 Sherman 7 0.02 29 0.1 -22
40 Oxford - 54 281 0.76 188 0.66 93
Aberdeen at Queen - 48 238 0.64 159 0.56 79
Aberdeen at Studholme - 37 136 0.37 50 0.18 86
Ainslie at Emerson - 25 162 0.44 266 0.94 -104

After comparing normalizing trip starts by total trip (%total_j, %total_n) we find an interesting difference: some hubs in November captured a greater percentage of ridershare, many of which fell within the McMaster Univeristy Campus:

hub freq_j %total_j freq_n %total_n diff
McMaster Student Centre - 17 896 2.42 1492 5.25 -596
McMaster Health Sciences - 10 723 1.95 1100 3.87 -377
McMaster Emerson - 15 441 1.19 614 2.16 -173
Main at Columbia College - 28 260 0.7 544 1.92 -284
Sanders at Hollywood - 13 329 0.89 489 1.72 -160
McMaster Arthur Bourns - 14 207 0.56 435 1.53 -228
McMaster Mary Keyes - 16 244 0.66 433 1.52 -189
King at Cline - 18 221 0.6 367 1.29 -146
Sanders at Binkley - 12 217 0.59 354 1.25 -137
McMaster Stadium - 11 70 0.19 316 1.11 -246
Forsyth at Sterling 186 0.5 312 1.1 -126
Ainslie at Emerson - 25 162 0.44 266 0.94 -104
Sterling at Whitton - 19 67 0.18 204 0.72 -137

This makes sense because school is not in session during the summer. Overall, the university hubs captured 16.54% of the total ridership starts in November - more than double than in July when that figure was only 7.47 %.

We can see see that 23 hubs out of 119 had more starts in November than in July, indicated in red on the density plot. These indicate important shifts in rider behavior as by default, if everything stayed the same, the number of starts per station should be less than in July by a ratio of 37:28.

nrow(data[data$diff < 0, ])
## [1] 23

Above are the 23 hubs (colored red) that experienced increased activity in November as comapred with July. The base layer is the urban extent of Hamilton. This phenomenon can also be seen by adding the contour density layers to the webmap .

Commutes

In order to identify possible commutes, we assumed:

  1. The commuting period fell on weekdays during the time periods: 6–10 am (06:00–10:00) and 4–8 pm (16:00–20:00)
  2. User.ID was the same going to and from work.
  3. Commutes are symmetric - starting and ending at the same place.
  4. Commuters started their commutes in the morning and ended their commutes in the evening.
  5. Only one commute can occur per user per day

It was observed that in July, 1300 trips met the criteria for a commute and in November, 1274 trips met the criteria.

It should be noted that the most common destination in both months was ths the hub 707 - the McMaster Student Center

  July November
total 1300 1274
% total 3.5 4.5
distance(km) 2.03 1.95
unique ids 267 233
duration(m) 9.9 9.3
top pair (hub ID) 551 - 707- 551 536 - 707 - 536
total top pair 31 24

Limitations: this method is excellent for identifying trips by unique users that go to and from point A and point B in one day, but there are several disadvantages:

  1. It is likely that commuters sometimes use bikeshare in only one direction
  2. Commuters may not always go to and from exactly the same hub
  3. This method does not take into account off-hour commuters who work the night shift for example.

Leisure

The difficulty of identifying leisure trips lies in the fact that we do not know the intent of the user. In this study, the assumption made was that if a trip started and ended at the same hub, it could not constitute any part of a commute. If we only consider these trips, they made up more than twice the share of total trips in July as compared with November.

  July November
start = end 3992 1487
total 37069 28401
% 10.8 5.2

Now we are left with more than half of trips in July and Novmeber unaccounted for as they do not fit our strict criteria of commutes and leisure. It is very probable that a large share of these trips fall into the category of either one-way commutes or leisure, but further research is needed to classify them. Landuse and/or parcel data would further help to pinpoint where riders live and where they work or go for recreation.

Distance Decay

The overlay of the tracks per grid (see web map) showed an interesting phenomenon: tracks often aligned with Hamilton’s bikeways. Bikeways are aimed at making cnnections between residential areas, areas of employment, and recreational amenities. The most popular routes were almost always found on this network of bike paths. This could serve as a guildine for locating stations in the the future.

[See bikeways and grid in web map and use the cursor to query cells]


In order to find out if there is a relationship between hub distance to the nearest bikeway and hub activity, the closest distances between hubs and the bikeway network were calcualted in PostGIS using ST_Distance()

##                            hub   dist
## 1               Gore Park - 74  15.48
## 2 James North at Mulberry - 76 127.59
## 3              Seedworks - 81B  79.50
## 4          King at Millers - 3 334.06
## 5           Cootes at King - 4 113.03
## 6         Cootes at Dundas - 5   5.15


A indirect relationship was found between distance and hub activity. The regression shows that on average for every two meters moved away from a bikeway, a hub lost approximately one trip.

## 
## Call:
## lm(formula = activity ~ distance)
## 
## Coefficients:
## (Intercept)     distance  
##    545.9119      -0.5484

Conclusions

This research demonstrated patterns in the ridership behavior in July and November in Hamilton, Ontario:

[See July: Pairs in web map]
[See November: Pairs in web map]